<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>Boolean functions</title>
	<style type="text/css">
	  table
	  {
	  border-collapse:collapse;
	  }
	  table, tr, th, td
	  {
	  border:1px solid black;
	  padding-left:8px;
	  padding-right:8px;
	  }
	  td
	  {
	  height:45px;
	  }
	  tr.select
	  {
	  background-color:yellow;
	  }
	  img
	  {
	  max-height:40px;
	  valign:center;
	  }
	</style>
	<link rel="stylesheet" title="plain" type="text/css" href="plain.css" />
	<link rel="alternate stylesheet" title="colour" type="text/css" href="colour.css"/>
</head>
<body>
  <table>
    <tr>
      <th rowspan="2">inputs</th>
      <th>A</th>
      <td>F</td>
      <td>F</td>
      <td>T</td>
      <td>T</td>
      <th rowspan="2">description</th>
      <th rowspan="2">code</th>
      <th rowspan="2">diagram</th>
    </tr>
    <tr>
      <th>B</th>
      <td>F</td>
      <td>T</td>
      <td>F</td>
      <td>T</td>
    </tr>
    <tr>
      <th rowspan="16">outputs</th>
      <th>1</th>
      <td>F</td>
      <td>F</td>
      <td>F</td>
      <td>F</td>
      <td>constant false</td>
      <td>false</td>
      <td><a href="F.png"><img src="F.png" /></a></td>
    </tr>
    <tr class="select">
      <th>2</th>
      <td>F</td>
      <td>F</td>
      <td>F</td>
      <td>T</td>
      <td>true if A and B are true</td>
      <td>A && B</td>
      <td><a href="AND.png"><img src="AND.png" /></a></td>
    </tr>
    <tr class="select">
      <th>3</th>
      <td>F</td>
      <td>F</td>
      <td>T</td>
      <td>F</td>
      <td>true if A is true and B is false</td>
      <td>A && !B</td>
      <td><a href="ANDNOT.png"><img src="ANDNOT.png" /></a></td>
    </tr>
    <tr>
      <th>4</th>
      <td>F</td>
      <td>F</td>
      <td>T</td>
      <td>T</td>
      <td>output A</td>
      <td>A</td>
      <td><a href="A.png"><img src="A.png" /></a></td>
    </tr>
    <tr class="select">
      <th>5</th>
      <td>F</td>
      <td>T</td>
      <td>F</td>
      <td>F</td>
      <td>true if A is false and B is true</td>
      <td>!A && B</td>
      <td><a href="NOTAND.png"><img src="NOTAND.png" /></a></td>
    </tr>
    <tr>
      <th>6</th>
      <td>F</td>
      <td>T</td>
      <td>F</td>
      <td>T</td>
      <td>output B</td>
      <td>B</td>
      <td><a href="B.png"><img src="B.png" /></a></td>
    </tr>
    <tr>
      <th>7</th>
      <td>F</td>
      <td>T</td>
      <td>T</td>
      <td>F</td>
      <td>true if A and B are different</td>
      <td>(!A && B) || (A && !B)</td>
      <td><a href="XOR.png"><img src="XOR.png" /></a></td>
    </tr>
    <tr>
      <th>8</th>
      <td>F</td>
      <td>T</td>
      <td>T</td>
      <td>T</td>
      <td>true if A is true or B is true</td>
      <td>A || B</td>
      <td><a href="OR.png"><img src="OR.png" /></a></td>
    </tr>
    <tr class="select">
      <th>9</th>
      <td>T</td>
      <td>F</td>
      <td>F</td>
      <td>F</td>
      <td>true if A and B are false</td>
      <td>!(A || B)</td>
      <td><a href="NOR.png"><img src="NOR.png" /></a></td>
    </tr>
    <tr>
      <th>10</th>
      <td>T</td>
      <td>F</td>
      <td>F</td>
      <td>T</td>
      <td>true if A and B are equal</td>
      <td>(A && B) || !(A || B)</td>
      <td><a href="XNOR.png"><img src="XNOR.png" /></a></td>
    </tr>
    <tr>
      <th>11</th>
      <td>T</td>
      <td>F</td>
      <td>T</td>
      <td>F</td>
      <td>false if B is true</td>
      <td>!B</td>
      <td><a href="NOTB.png"><img src="NOTB.png" /></a></td>
    </tr>
    <tr>
      <th>12</th>
      <td>T</td>
      <td>F</td>
      <td>T</td>
      <td>T</td>
      <td>false if A is false and B is true</td>
      <td>!(!A && B)</td>
      <td><a href="NOTNOTAND.png"><img src="NOTNOTAND.png" /></a></td>
    </tr>
    <tr>
      <th>13</th>
      <td>T</td>
      <td>T</td>
      <td>F</td>
      <td>F</td>
      <td>false if A is true</td>
      <td>!A</td>
      <td><a href="NOTA.png"><img src="NOTA.png" /></a></td>
    </tr>
    <tr>
      <th>14</th>
      <td>T</td>
      <td>T</td>
      <td>F</td>
      <td>T</td>
      <td>false if A is true and B is false</td>
      <td>!(A && !B)</td>
      <td><a href="NOTANDNOT.png"><img src="NOTANDNOT.png" /></a></td>
    </tr>
    <tr>
      <th>15</th>
      <td>T</td>
      <td>T</td>
      <td>T</td>
      <td>F</td>
      <td>false if A and B are true</td>
      <td>!(A && B)</td>
      <td><a href="NAND.png"><img src="NAND.png" /></a></td>
    </tr>
    <tr>
      <th>16</th>
      <td>T</td>
      <td>T</td>
      <td>T</td>
      <td>T</td>
      <td>constant true</td>
      <td>true</td>
      <td><a href="T.png"><img src="T.png" /></a></td>
    </tr>
  </table>
</body>
</html>
